]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Add goblint configuration
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 28 Apr 2026 10:25:15 +0000 (12:25 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 4 May 2026 12:45:41 +0000 (12:45 +0000)
When discussing goblint on Matrix, there were some concerns
around its rules for defining properties:

 - having to explicitly track the last property ID, instead
   of including N_PROPS in the anonymous enum

 - including read-only properties in set() and write-only in get()
   adds unreachable code, which is bad for code coverage

Those were considered more important than the benefit of checking
get()/set() with `-Wswitch-enum`, so at least for now stick with
the existing property conventions.

Add a configuration that enables "legacy" style for the corresponding
rules.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4198>

goblint.toml [new file with mode: 0644]

diff --git a/goblint.toml b/goblint.toml
new file mode 100644 (file)
index 0000000..e12c910
--- /dev/null
@@ -0,0 +1,7 @@
+[rules.property_enum_convention]
+style = "legacy"
+
+[rules.property_switch_exhaustiveness]
+style = "legacy"
+readable_flags = ["ST_PARAM_READABLE", "ST_PARAM_READWRITE"]
+writable_flags = ["ST_PARAM_WRITABLE", "ST_PARAM_READWRITE"]